//
//  SheZhiViewController.m
//  JuBoCRM
//
//  Created by iMac on 2024/2/23.
//  Copyright © 2024 iningKe. All rights reserved.
//

#import "SheZhiViewController.h"
#import "XiuGaiMiMaViewController.h"
#import "AppDelegate.h"
@interface SheZhiViewController ()

@property (weak, nonatomic) IBOutlet TPKeyboardAvoidingScrollView *mainScrollView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *topSpace;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomSpace;

@end

@implementation SheZhiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    
    self.customNavBar.title = @"设置";
 
    _topSpace.constant = NavaBarHeight;
    
    _bottomSpace.constant = ScreenBottom+20;
    
    if (@available(iOS 11.0, *)) {
        self.mainScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    }
    
}

//修改密码
- (IBAction)xiuGai:(UITapGestureRecognizer *)sender {
    XiuGaiMiMaViewController *xiu = [[XiuGaiMiMaViewController alloc] init];
    [self pushViewController:xiu];
}

//退出登录
- (IBAction)tuiChu:(UIButton *)sender {
    [ZZPUtils removeUserDefultsDataForkey:@"userInfo"];
    [ZZPUtils removeUserDefultsDataForkey:@"adminToken"];
    LoginViewController *login = [[LoginViewController alloc] init];
    GXBaseNavController *nav = [[GXBaseNavController alloc]initWithRootViewController:login];
    [AppDelegate shareInstance].window.rootViewController = nav;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
